<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('perfil/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?idacessopermissoes='.$form->getObject()->getIdacessopermissoes() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
 <div>
    <fieldset class="formulario">
        <legend class="padraoCinza">Cadastro de permissões de acesso</legend>
        <div class="cc">
            <?php
                echo $form['idusuario']->renderLabel();
                echo $form['idusuario']->renderError();
                echo "<div class=\"contensorinput\">".$form['idusuario']->render()."</div>";
            ?>
        </div>
        <div class="db">
            <?php
                echo $form['idpermissao']->renderLabel();
                echo $form['idpermissao']->renderError();
                echo "<div class=\"contensorinput\">".$form['idpermissao']->render()."</div>";
            ?>
        </div>
        <div class="db">
            <?php
                //echo $form['idusuarios']->renderLabel();
                //echo $form['idusuarios']->renderError();
                echo "<div class=\"contensorinput\">".$form['idacessopermissoes']->render()."</div>";
            ?>
         </div>   
         <span class="clearfix"></span>
    </fieldset>
    <div>
    </br>
    <div align="center">
        &nbsp;<a href="<?php echo url_for('perfil/index') ?>">Voltar</a>
        <?php if (!$form->getObject()->isNew()): ?> 
            &nbsp;<?php echo link_to('Apagar', 'perfil/delete?idacessopermissoes='.$form->getObject()->getIdacessopermissoes(), array('method' => 'delete', 'confirm' => 'Você confirma esta operação?')) ?>
        <?php endif; ?>
        <!--<input type="submit" value="Salvar" />-->
        <button type="submit" value="Salvar alterações" class="botaoSalvarCinza" >Salvar alterações</button>
    </div>
    </br>
